# 读取json数据
import json
import os


def read_json(filename,key):
    filepath = os.path.dirname(__file__) + os.sep + "data" + os.sep + filename
    arr=[]
    with open(filepath, "r",encoding="utf-8")as f:
        for data in json.load(f).get(key):
            temp=tuple(data.values())
            arr.append(temp)
            return arr

if __name__ == '__main__':
    print(read_json("login.json",'login'))
